package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * 店铺商品基本信息对象 mall_store_goods
 *
 * @author tencreat
 * @date 2021-08-19
 */
@Data
@ApiModel
@TableName("mall_store_goods")
public class MallStoreGoods extends BaseEntity<MallStoreGoods>{
    private static final long serialVersionUID = 1L;


    /** $column.columnComment */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;


    /** 商品编号 */
    @Excel(name = "商品编号")
    @ApiModelProperty(value= "商品编号")
    @TableField("`goods_sn`")
    private String goodsSn;

    @Excel(name = "商品分组")
    @ApiModelProperty(value = "商品分组")
    @TableField("`goods_group`")
    private String goodsGroup;

    @ApiModelProperty("审核状态,0|待审核,1|已通过,2|已驳回")
    private Integer auditStatus;

    @ApiModelProperty("审核意见")
    private String auditOpinion;

    /** 商品名称 */
    @Excel(name = "商品名称")
    @ApiModelProperty(value= "商品名称")
    @TableField("`name`")
    private String name;

    @ApiModelProperty("上传商品的用户ID")
    private Long userId;


/*    *//**
     * 描述信息 新增套餐商品字段
     * @Author yaoruiqi
     * @Date: 2023/10/08 04:29
     *//*
     @Excel(name = "套餐商品")
     @ApiModelProperty(value = "套餐商品")
     @TableField("")
     private String goodsPackage;*/

    /** 商品所属类目ID */
    @Excel(name = "商品所属类目ID")
    @ApiModelProperty(value= "商品所属类目ID")
    @TableField("`category_id`")
    private Long categoryId;

    @ApiModelProperty("顶级类目ID")
    private Long topCategoryId;

    /** $column.columnComment */
    @Excel(name = "品牌所属类目ID")
    @ApiModelProperty(value= "品牌所属类目ID")
    @TableField("`brand_id`")
    private Long brandId;


    /** 商品宣传图片列表，采用JSON数组格式 */
    @Excel(name = "商品宣传图片列表，采用JSON数组格式")
    @ApiModelProperty(value= "商品宣传图片列表，采用JSON数组格式")
    @TableField("`gallery`")
    private String gallery;


    /** 商品关键字，采用逗号间隔 */
    @Excel(name = "商品关键字，采用逗号间隔")
    @ApiModelProperty(value= "商品关键字，采用逗号间隔")
    @TableField("`keywords`")
    private String keywords;


    /** 商品简介 */
    @Excel(name = "商品简介")
    @ApiModelProperty(value= "商品简介")
    @TableField("`brief`")
    private String brief;


    /** 是否上架(1 上架 0 下架) */
    @Excel(name = "是否上架")
    @ApiModelProperty(value= "是否上架")
    @TableField("`is_on_sale`")
    private Integer isOnSale;


    /** $column.columnComment */
    @Excel(name = "排序")
    @ApiModelProperty(value= "排序")
    @TableField("`sort_order`")
    private Integer sortOrder;


    /** 商品页面商品图片 */
    @Excel(name = "商品页面商品图片")
    @ApiModelProperty(value= "商品页面商品图片")
    @TableField("`pic_url`")
    private String picUrl;

    /** 3d展示图 */
    @Excel(name = "3d展示图")
    @ApiModelProperty(value= "3d展示图")
    @TableField("`three_d_url`")
    private String threeDUrl;


    /** 商品分享海报 */
    @Excel(name = "商品分享海报")
    @ApiModelProperty(value= "商品分享海报")
    @TableField("`share_url`")
    private String shareUrl;


    /** 是否新品首发，如果设置则可以在新品首发页面展示 */
    @Excel(name = "是否新品首发，如果设置则可以在新品首发页面展示")
    @ApiModelProperty(value= "是否新品首发，如果设置则可以在新品首发页面展示")
    @TableField("`is_new`")
    private Integer isNew;


    /** 是否人气推荐，如果设置则可以在人气推荐页面展示 */
    @Excel(name = "是否人气推荐，如果设置则可以在人气推荐页面展示")
    @ApiModelProperty(value= "是否人气推荐，如果设置则可以在人气推荐页面展示")
    @TableField("`is_hot`")
    private Integer isHot;


    /** 商品单位，例如件、盒 */
    @Excel(name = "商品单位，例如件、盒")
    @ApiModelProperty(value= "商品单位，例如件、盒")
    @TableField("`unit`")
    private String unit;


    /** 专柜价格 */
    @Excel(name = "专柜价格(原价)")
    @ApiModelProperty(value= "专柜价格(原价)")
    @TableField("`counter_price`")
    private BigDecimal counterPrice;

    @Excel(name = "商品类型")
    @ApiModelProperty(value = "商品类型")
    @TableField("`goods_type`")
    private String goodsType;

/*    @ApiModelProperty("是否是供应商商品")
    private Integer supplier;*/

    @ApiModelProperty("是否是店铺商品")
    private Integer store;

    @Excel(name = "预计销量")
    @ApiModelProperty("预计销量")
    @TableField("`expect_commodity_sales`")
    private Long expectCommoditySales;

    @Excel(name = "商品销量")
    @ApiModelProperty(value = "商品销量")
    @TableField("`commodity_sales`")
    private Long commoditySales;

    @Excel(name = "销售折扣")
    @ApiModelProperty(value = "销售折扣")
    @TableField("`sales_discount`")
    private String salesDiscount;

    @Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上架时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm")
    @TableField("`shelf_time`")
    private LocalDateTime shelfTime;


    /** 商品价格 */
    @Excel(name = "商品价格(现价)售价")
    @ApiModelProperty(value= "商品价格(现价)售价")
    @TableField("`retail_price`")
    private BigDecimal retailPrice;


    @ApiModelProperty("供应价")
    private BigDecimal supplyPrice;

    @Excel(name = "库存")
    @ApiModelProperty(value = "库存")
    @TableField("`inventory`")
    private Long inventory;


    /** 商品详细介绍，是富文本格式 */
    @Excel(name = "商品详细介绍，是富文本格式")
    @ApiModelProperty(value= "商品详细介绍，是富文本格式")
    @TableField("`detail`")
    private String detail;


    /** 删除标志（0代表存在 2代表删除） */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;

    /** 租户ID */
    @Excel(name = "租户ID")
    @ApiModelProperty(value= "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;

    @TableField("`brand`")
    @ApiModelProperty(value= "品牌 0-关闭 1-开启")
    private Integer brand;

    @TableField("`burst`")
    @ApiModelProperty(value= "爆款 0-关闭 1-开启")
    private Integer burst;

    @TableField("`describe`")
    @ApiModelProperty("简介/描述")
    private String describe;

    @ApiModelProperty(value= "商品视频")
    @TableField("`video_url`")
    private String videoUrl;

    @ApiModelProperty(value= "抵扣金额")
    @TableField("`deduct_price`")
    private BigDecimal deductPrice;

    @ApiModelProperty(value= "显示顺序")
    @TableField("`sort`")
    private Integer sort;

    @ApiModelProperty(value= "是否分佣 1-是 0-否")
    @TableField("`is_bonus`")
    private Integer isBonus;

    @ApiModelProperty(value= "是否置顶  0-否 1-是")
    private Integer top;


    /**
     * 描述信息  店铺商品可用时间
     * @Author yaoruiqi
     * @Date: 2023/10/11 05:27
     */
    @ApiModelProperty("店铺商品可用时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime useTime;

/*
    @ApiModelProperty("商品售卖开始时间")//商品售卖开始时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime saleStartTime;
*/

    @ApiModelProperty("截止时间")//商品售卖结束时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime saleEndTime;

    @ApiModelProperty("核销时间")//商品核销结束时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime verificationTime;
}
